package com.inspur.cmis.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.inspur.cmis.mapper.UserMapper;
import com.inspur.cmis.pojo.User;
import com.inspur.cmis.service.UserService;
@Service("userService")
public class UserServiceImpl implements UserService{
	@Autowired
    private UserMapper userMapper;
	
	/**
	 * 用户登录查询
	 */
	public User getUser(User user) {
		// TODO Auto-generated method stub
		return userMapper.getUser(user);
	}

	/**
	 * 用户的默认查询
	 */
	public List<User> getUserList( Map map) {
		// TODO Auto-generated method stub
		return userMapper.getUserList(map);
	}

	@Override
	public User getById(User user) {
		// TODO Auto-generated method stub
		User user1=userMapper.getById(user);
		return user1;
	}

	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		int count=userMapper.getCount();
		return count;
	}
	//添加用户
	@Override
	public int addUser2(User user) {
		// TODO Auto-generated method stub
		int i=userMapper.addUser2(user);
		System.out.println(user.getUserId()+"----------------------------------service");
		return i;
	}
	//修改用户
	@Override
	public int updateUser(Map map) {
		// TODO Auto-generated method stub
		
		int i=userMapper.updateUser(map);
		return i;
	}

	@Override
	public void deleteUser(String userIds[]){
		// TODO Auto-generated method stub
		 userMapper.deleteUser(userIds);
	}

	@Override
	public int updateUsers(List list) {
		// TODO Auto-generated method stub
		return userMapper.updateUsers(list);
	}

	@Override
	public List<User> getUserByUserName(String username) {
		// TODO Auto-generated method stub
		return userMapper.getUserByUserName(username);
	}

	@Override
	public void importUser(List<User> list) {
		// TODO Auto-generated method stub
		userMapper.importUser(list);
		
	}


	

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
}
